package io.xxx.xbutler.core.callback;

import io.xxx.xbutler.domain.Callback;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 商家机器人账号密码托管登录接口回调
 *
 * <pre>
 * {
 *     "nType": 1038,
 *     "vcMerchantNo": "",
 *     "vcSerialNo": "20200718160746765520310279559",
 *     "nResult": 1,
 *     "vcResult": "SUCCESS",
 *     "Data": {
 *         "vcRobotSerialNo": "", //首次登录，因为不确定微信ID，为空字符串；二次登录则有值
 *         "vcCodeUrl": "", //授权二维码
 *         "vcCodeImgUrl": "http://kfpt.oss-cn-hangzhou.aliyuncs.com/pc/QrCode/2023020101/92b71fc9f4d648c6a5d845005feea4c1.jpeg" //授权二维码图片地址
 *     }
 * }
 * </pre>
 */
@Slf4j
@Component
public class _1038Handler implements CallbackHandler {

    @Override
    public String name() {
        return "商家机器人账号密码托管登录接口回调";
    }

    @Override
    public boolean supports(int type) {
        return type == 1038;
    }

    @Override
    public void handle(Callback callback) {
        // 没有托管机器人，ignore
    }
}
